package ca.etsmtl.log430.common;

/**
 * Class representing a resource's set of data as read from the disk or any datastore.
 * Maps the basic attributes of the Resource class in the Management layer
 * @author Adam
 *
 */
public class ResourceData {
        /**
         * Resource's last name
         */
        private String lastName;
       
        /**
         * Resource's first name
         */
        private String firstName;
       
        /**
         * Resource's identification number
         */
        private String id;
       
        /**
         * Resource role
         */
        private String role;

        /**
         *  List of projects the resource is already allocated to
         */
        private String projectIDList = "";
       
        /** Constructor and methods **/
        public ResourceData()
        {
        }
       
        /** Setters **/
        public void setId(String id)
        {
                this.id = id;
        }
       
        public void setFirstname(String fn)
        {
                this.firstName = fn;
        }
       
        public void setLastname(String ln)
        {
                this.lastName = ln;
        }
       
        public void setRole(String r)
        {
                this.role = r;
        }
       
        public void addProjectId(String projectId)
        {
                this.projectIDList += projectId + "_";
        }
       
        /** Getters **/
        public String getId()
        {
                return this.id;
        }
       
        public String getFirstname()
        {
                return this.firstName;
        }
       
        public String getLastname()
        {
                return this.lastName;
        }
       
        public String getRole()
        {
                return this.role;
        }
       
        public String getProjectIds()
        {
                return this.projectIDList;
        }
}
